﻿
<%@ Page Language="C#" MasterPageFile="~/Home/login.master" AutoEventWireup="true" CodeFile="buy.aspx.cs" Inherits="Home_buy" Title="Welcome to IT" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <%
        
        
        string by;        
        by=Request["by"];
        if (by == "100")
        { 
    %>
   <asp:Label ID="Lbgio" runat="server" Text="Label"></asp:Label>
    <asp:DataList ID="DataList1" runat="server" AlternatingItemStyle-VerticalAlign="NotSet" RepeatColumns="3" RepeatDirection="Horizontal" Height="758px">
         <ItemTemplate>
          
         
          <div class="size_icon">
              <div style="float:left; width:100%" class="images_size"><a href="view.aspx?chitiet=<%#DataBinder.Eval(Container.DataItem, "ID")%>" title="Click vào để Xem chi tiết sản phẩm"><img src='images/sanpham/<%#DataBinder.Eval(Container.DataItem,"HinhMinhHoa1") %>' width="90" height="90"  border="0"/></a></div>
              <div style="float:left; width:100%" ><b>Tên sản phẩm:</b><%#DataBinder.Eval(Container.DataItem, "TenSP")%></div>
              <div style="float:left; width:100%" >Giá cao nhất hiện thời<%#DataBinder.Eval(Container.DataItem, "GiaCaoNhat")%>(VND)</div>
              <div style="float:left; width:100%" >Số lượng khách tham gia:<%#DataBinder.Eval(Container.DataItem, "Ngay")%></div>
              <div style="float:left; width:100%" >Thời gian kết thúc:
               <asp:Label ID="Lbgio" runat="server" Text=""></asp:Label>
              <% 
                 
                
                DateTime dt;
                  dt = DateTime.Now;
                  long tg;
                  int songay;
                  int sogio;
                  int sophut;
                  int sophutconlai;
                  
                  int id = 34;
                  tg = Dao.nam_thang_ngay_gio_phut(dt, users.Nam(id), users.Thang(id), users.Ngay(id), users.Gio(id), users.Phut(id));
                  Response.Write(tg);
                  
                  
                  %>
              </div>
              
            
                   <div  style="float:left"  class="tab_menu_01">
	                <ul class="tabmenu2">
	                
		         <li><a href="buy.aspx?buy=<%#DataBinder.Eval(Container.DataItem, "ID")%>" title="Mua ngay sản phẩm này"><b>Mua Ngay</b></a></li>
		         <li><a href="buy.aspx?by=mua10&&view=<%#DataBinder.Eval(Container.DataItem, "ID")%>" title="Đang theo dõi sản phẩm này"><b>Theo dõi</b></a></li>	
	                  </ul>
	             </div>
    
           
          </div>
         
         
          
          </ItemTemplate> 
          <FooterTemplate>
          </FooterTemplate> 
 
    </asp:DataList>
    <table align=center width=100% bgcolor=Gainsboro>
    
        <tr>
<td style="width: 399px; text-align: center"><asp:LinkButton id="LinkButton1" runat="server" OnClick="LinkButton1_Click">&lt;&lt; Quay lui </asp:LinkButton> &nbsp;&nbsp;
<asp:LinkButton id="LinkButton2" runat="server" OnClick="LinkButton2_Click">Tới &gt;&gt;</asp:LinkButton></td>
</tr>
<tr>
<td style="width: 399px"><asp:TextBox id="TextBox2" runat="server" Visible="false">0</asp:TextBox></td>
</tr> 

    </table>
    
   
    
<%} %>

<%
    string view;
    view = Request["view"];
    if(view=="1")
    {
  %>
      
        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="table4">
	        <tr>
		        <td>
		        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="table48" style="border: 1px solid #800000; ">
			        <tr>
				        <td>
				        <table border="0" cellpadding="0" cellspacing="4" width="100%" id="table49">
					        <tr>
						        <td>
						        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="table50">
							        <tr>
								        <td>
								        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="table51">
									        <tr>
										        <td>
				        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="table57">
					        <tr>
						        
						        <td style="width: 686px"></td>
						       
					        </tr>
					        <tr>
						        
						        <td style="width: 686px; height: 168px;">
				        <table style="width: 100%">
					        <tr>
						        
						        <td style="width: 100%">
						        <table style="width: 100%" cellspacing="0" cellpadding="0">
							        <tr>
								        <td style="width: 26px; height: 20px; vertical-align: top;" class="style12">
								        <img src="images/conner3_left_top.gif" width="26" height="20" alt="" /></td>
								        <td class="style10" style="height: 20px; text-align: center; width: 602px;"><b>Hệ thống sàn đấu giá (<asp:Label ID="Path" runat="server" Text="Label"></asp:Label>)</b></td>
								        <td style="height: 20px; vertical-align: top" class="style13">
								        <img src="images/conner3_left_right.gif" width="25" height="20" alt="" /></td>
							        </tr>
							        <tr>
								        <td style="width: 26px; vertical-align:top; height: 473px;" class="style12">
								        <img src="images/left3_bg.gif" width="25" height="58" alt="" /></td>
								        <td valign="top" class="style11" style="width: 602px; height: 473px;">
								 <table style="width: 100%">
                                                <tr>
                                                    <td align="right" style="width: 316px; vertical-align: text-top; font-weight: bold; color: #6600cc;">
                                                        Hình&nbsp; ảnh minh họa</td>
                                                    <td width="838" align="center">
                                                        <asp:Image ID="Image1" runat="server" /></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                        Giá hiện tại</td>
                                                    <td>
                                                        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; vertical-align: text-top; font-weight: bold; color: #6600cc;">
                                                        Quá trình đấu giá</td>
                                                    <td>
                                                       <asp:DataGrid ID="result" runat="server" AutoGenerateColumns="False" GridLines="None"
                                                PageSize="1" Width="73%"  Height="100px">
                                                <AlternatingItemStyle BackColor="Tan" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                                                    Font-Strikeout="False" Font-Underline="False" ForeColor="MediumPurple" />
                                                <Columns>
                                                    <asp:TemplateColumn HeaderText="User">
                                                       <HeaderStyle Font-Bold="True" Font-Size="12pt" ForeColor="White" HorizontalAlign="Left"
                                                            VerticalAlign="Middle" />
                                                        <ItemStyle CssClass="text2" HorizontalAlign="Left" VerticalAlign="Middle" Width="500px" />
                                                     <ItemTemplate>
									                <%#   DataBinder.Eval(Container.DataItem, "TenDangNhap")%>
											</ItemTemplate>
                                                        <FooterStyle BackColor="#CCFFCC" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                       
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn HeaderText="Amount">
                                                     
                                                        <HeaderStyle Font-Bold="True" Font-Size="12pt" ForeColor="White" HorizontalAlign="Left"
                                                            VerticalAlign="Middle" />
                                                        <ItemStyle CssClass="text2" HorizontalAlign="Left" VerticalAlign="Middle" Width="500px" />
                                                        <ItemTemplate>
									                <%#   DataBinder.Eval(Container.DataItem, "SoTien")%></ItemTemplate>
									                <FooterStyle BackColor="#CCFFCC" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
											
                                                        </asp:TemplateColumn>
                                                    <asp:TemplateColumn HeaderText="Date">
                                                     
                                                        <HeaderStyle Font-Bold="True" Font-Size="12pt" ForeColor="White" HorizontalAlign="Left"
                                                            VerticalAlign="Middle" />
                                                        <ItemStyle CssClass="text2" HorizontalAlign="Left" VerticalAlign="Middle" Width="500px" />
                                                         <ItemTemplate>
									                <%#   DataBinder.Eval(Container.DataItem, "ThoiGian")%></ItemTemplate>
									                <FooterStyle BackColor="#CCFFCC" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
											</asp:TemplateColumn>
                                                </Columns>
                                            </asp:DataGrid>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                        Người trả cao nhất</td>
                                                    <td>
                                                        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                        Người bán</td>
                                                    <td>
                                                        <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                        Mô tả</td>
                                                    <td style="height: 21px">
                                                        <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc; height: 21px;">
                                                        Cách thức thanh toán</td>
                                                    <td style="height: 21px">
                                                        <asp:Label ID="Label6" runat="server" Text="Label"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                        Chính sách trả hàng</td>
                                                    <td style="width: 100px">
                                                        <asp:Label ID="Label5" runat="server" Text="Label"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                        Địa điểm nhận hàng</td>
                                                    <td>
                                                        <asp:Label ID="Label7" runat="server" Text="Label"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                        Phí vận chuyển</td>
                                                    <td style="width: 100px; height: 21px;">
                                                        <asp:Label ID="Label8" runat="server" Text="Label"></asp:Label></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                        Ra giá</td>
                                                    <td>
                                                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                    </td>
                                                    <td style="width: 100px; height: 21px">
                                                        <asp:Button ID="Bt_dongy" runat="server" Text="Đồng ý" /></td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 316px; font-weight: bold; vertical-align: text-top; color: #6600cc;">
                                                    </td>
                                                    <td style="width: 100px; height: 21px">
                                                    </td>
                                                </tr>
                                            </table>
                                            </td>
								        <td class="style13" valign="top" style="height: 473px">
								        <img src="images/right3_bg.gif" width="25" height="58"alt="" id="IMG1" language="javascript" onclick="return IMG1_onclick()" /></td>
							        </tr>
							        <tr>
								        <td style="width: 26px">
								        <img src="images/conner3_bottom_left.gif" width="26" height="46" alt="" /></td>
								        <td class="style8" style="width: 602px">&nbsp;</td>
								        <td>
								        <img src="images/conner3_bottom_right.gif" width="25" height="46"></td>
							        </tr>
						        </table>
						        </td>
						       
					        </tr>
				        </table>
				        
						        </td>
						        
					        </tr>
					        </table>
										        </td>
									        </tr>
								        </table>
								        </td>
							        </tr>
						        </table>
						        </td>
					        </tr>
				        </table>
        </td>
			        </tr>
		        </table>
		        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="table15">
			        <tr>
				        <td>
				        <img border="0" src="images/button_white.gif" width="2" height="2"></td>
			        </tr>
		        </table>
		        </td>
	        </tr>
        </table>
  
  
  <%} %>
  

</asp:Content>

